package com.shass.mybatis.cxf.cfg;

import javax.xml.ws.Endpoint;


import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.shass.mybatis.cxf.UserCxfService;

@Configuration
public class CxfConfig {

	@Autowired
    private Bus bus;
    @Autowired
    private UserCxfService service ;
    
	@Bean
	public Endpoint endpoint(){
		EndpointImpl endpointImpl = new EndpointImpl(bus, service ) ;
		endpointImpl.publish("/userCxfService");
		
		return endpointImpl ;
	}
}
